﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using WalkingTec.Mvvm.Core;
using System.Text.Json.Serialization;
using TyMES.Model;

namespace TyMES.Model.BaseInformation
{
    /// <summary>
    /// 产品管理
    /// </summary>
	[Table("T_Products")]
    [SoftKey(nameof(Product.ProductCode))]
    [Display(Name = "_Model.Product")]
    public class Product : TopBasePoco
    {
        [Display(Name = "_Model._Product._ProductCode")]
        [StringLength(100, ErrorMessage = "Validate.{0}stringmax{1}")]
        [Comment("产品编码")]
        [Required(ErrorMessage = "Validate.{0}required")]
        [CanNotEdit]
        public string ProductCode { get; set; }
        [Display(Name = "_Model._Product._ProductName")]
        [Comment("产品名称")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public string ProductName { get; set; }
        [Display(Name = "_Model._Product._ProductVersion")]
        [Comment("产品版本")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public string ProductVersion { get; set; }
        [Display(Name = "_Model._Product._Product_Type")]
        [Comment("产品类型")]
        public ProductTypeEnum? Product_Type { get; set; }
        [Display(Name = "_Model._Product._IsVulnerable")]
        [Comment("是否易损")]
        public bool? IsVulnerable { get; set; }
        [Display(Name = "_Model._Product._ProductStatus")]
        [Comment("产品状态")]
        public string ProductStatus { get; set; }
        [Display(Name = "_Model._Product._Notes")]
        [Comment("备注")]
        public string Notes { get; set; }

	}

}
